﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BestPrice.Core
{
    using Common;

    public interface IBaseManager
    {
    }

    public interface IManager<E, Key> : IBaseManager
        where E : BaseEntity
        where Key : BaseKey
    {
        E GetByID(Key key);

        void BeforeInsert(E obj);

        void Insert(E obj);

        void AfterInsert(E obj);

        void BeforeUpdate(E obj);

        void Update(E obj);

        void AfterUpdate(E obj);

        void BeforeDelete(E obj);

        void Delete(E obj);

        void AfterDelete(E obj);

        void Delete(Key key);

        bool Exist(Key key);
    }
}
